﻿using Sessionizer.Core;

namespace Sessionizer.Tests.Abstraction
{
    public static class IoCContainerExtensions
    {
        public static ISession Session(this IIoCContainer container)
        {
            return container.Resolve<ISessionFactory>().Create();
        }

        public static T Resolve<T>(this IIoCContainer container)
        {
            return (T)container.Resolve(typeof (T));
        }
    }
}